import { Body, Controller, Get, Post, Req, Res } from '@nestjs/common'
import { StoreService } from './store.service'
import { Request, Response } from 'express'
@Controller('store')
export class StoreController {
  constructor(private readonly StoreService: StoreService) {}
  @Get()
  getStoreData(){
    return this.StoreService.getStoreData()
  }
  @Post("search")
  searchStoreData(@Req() req:Request, @Res() res:Response){
    return this.StoreService.searchStoreData(req,res)
  }
  @Post('add')
  addStoreDate(@Body() body:any){
    return this.StoreService.addStoreDate(body)
  }
}
